<!DOCTYPE html>
<html>
  <head>
    <link rel="canonical" href="http://blog.csdn.net/chencaw/article/details/78410187"/> 
    <script type="text/javascript">
        var username = "chencaw";
        var _blogger = username;
        var blog_address = "http://blog.csdn.net/chencaw";
        var static_host = "http://csdnimg.cn/release/phoenix/";
        var currentUserName = ""; 
        var fileName = '78410187';
        var commentscount = 0;
        var islock = false;
        window.quickReplyflag = true;
        var totalFloor = 0;
        var isBole = false;
        var isDigg = false;
        var isExpert = false;
        var isAdm = false;
        var baiduKey = "scrapy+%E7%99%BE%E5%BA%A6%E5%9B%BE%E7%89%87";
        var needInsertBaidu = false;
        var isShowAds = true;
    </script>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <script src="http://c.csdnimg.cn/public/common/libs/jquery/jquery-1.9.1.min.js" type="text/javascript"></script>
    <link rel="stylesheet" href="http://c.csdnimg.cn/public/static/css/avatar.css">
                <link rel="stylesheet" href="http://csdnimg.cn/release/phoenix/production/main-ffb45d8453.css">
          <link rel="stylesheet" href="http://c.csdnimg.cn/public/common/toolbar/content_toolbar_css/content_toolbar.css">

    <script src="http://csdnimg.cn/rabbit/exposure-click/main-1.0.5.js"></script>
    <script type="text/javascript" src="http://csdnimg.cn/pubfooter/js/tracking-1.0.2.js" charset="utf-8"></script>
    <script type="text/javascript" src="http://csdnimg.cn/release/phoenix/production/main-df0973cd7f.js"></script>

    <script src="http://dup.baidustatic.com/js/ds.js"></script>
    <script type="text/javascript">
        // Traffic Stats of the entire Web site By baidu
        var _hmt = _hmt || [];
        (function() {
            var hm = document.createElement("script");
            hm.src = "https://hm.baidu.com/hm.js?6bcd52f51e9b3dce32bec4a3997715ac";
            var s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(hm, s);
        })();
        // Traffic Stats of the entire Web site By baidu end
    </script>
    <meta name="description" content="转载于
http://www.cnblogs.com/one-lightyear/p/python_crawl_image_baidu.html


##author:wuhao##爬取指定页码的图片，如果需要爬取某一类的所有图片，整体框架不变，但需要另作分析#import urllib.requestimport urllib.parseimport reimport os#添加head" />
    <meta name="keywords" content="" />
    <meta http-equiv="Cache-Control" content="no-siteapp" /><link rel="alternate" media="handheld" href="#" />
    <meta name="shenma-site-verification" content="5a59773ab8077d4a62bf469ab966a63b_1497598848">
    <title>python3抓取百度图片 - CSDN博客</title>
    <link href="http://csdnimg.cn/public/favicon.ico" rel="SHORTCUT ICON">
              <script src="//csdnimg.cn/search/baidu_search-1.0.0.js?v=201802021047&autorun=true&install=true&keyword=scrapy+%E7%99%BE%E5%BA%A6%E5%9B%BE%E7%89%87"  type="text/javascript"></script>
      </head>
<body>
<script id="toolbar-tpl-scriptId" prod="download" skin="black" src="http://c.csdnimg.cn/public/common/toolbar/js/content_toolbar.js" type="text/javascript" domain="http://blog.csdn.net/"></script>
<div class="container clearfix">
  <main>
      <div style="display:none;">
          <img src="" onerror='setTimeout(function(){if(top !== self){window["\x74\x6f\x70"]["\x6c\x6f\x63\x61\x74\x69\x6f\x6e"]["\x68\x72\x65\x66"] = window["\x6c\x6f\x63\x61\x74\x69\x6f\x6e"]["\x68\x72\x65\x66"];}            if(typeof(csdn)=="\x75\x6e\x64\x65\x66\x69\x6e\x65\x64"&&window["\x6c\x6f\x63\x61\x74\x69\x6f\x6e"]["\x68\x6f\x73\x74"]["\x69\x6e\x64\x65\x78\x4f\x66"]("\x63\x73\x64\x6e\x2e\x6e\x65\x74")<0&&window["\x6c\x6f\x63\x61\x74\x69\x6f\x6e"]["\x68\x6f\x73\x74"]["\x69\x6e\x64\x65\x78\x4f\x66"]("\x69\x74\x65\x79\x65\x2e\x63\x6f\x6d")<0){window["\x6c\x6f\x63\x61\x74\x69\x6f\x6e"]["\x68\x72\x65\x66"]="\x68\x74\x74\x70\x73\x3a\x2f\x2f\x77\x77\x77\x2e\x63\x73\x64\x6e\x2e\x6e\x65\x74";}},3000);'>
      </div>
    <article>
        <h1 class="csdn_top">python3抓取百度图片</h1>
        <div class="article_bar clearfix">
            <div class="artical_tag">
                <span class="original">
                转载                </span>
                <span class="time">2017年11月01日 09:01:41</span>
            </div>

            <ul class="article_tags clearfix csdn-tracking-statistics tracking-click" data-mod="popu_377" >
                <li class="tit">标签：</li>

<!--          [startarticletags]-->
                <!--          [endarticletags]-->
            </ul>
            <ul class="right_bar">
                <li><button class="btn-noborder"><i class="icon iconfont icon-read"></i><span class="txt">266</span></button></li>
                <li class="edit">
                    <a class="btn-noborder" href="" >
                        <i class="icon iconfont icon-bianji"></i><span class="txt">编辑</span>
                    </a>
                </li>
                <li class="del">
                    <a class="btn-noborder" onclick="javascript:deleteArticle(fileName);return false;">
                        <i class="icon iconfont icon-shanchu"></i><span class="txt">删除</span>
                    </a>
                </li>
            </ul>
        </div>
        <div id="article_content" class="article_content csdn-tracking-statistics tracking-click" data-mod="popu_519" data-dsm="post">
                        
<p>转载于</p>
<p>http://www.cnblogs.com/one-lightyear/p/python_crawl_image_baidu.html<br /></p>
<p></p>
<pre style="margin-top:0px;margin-bottom:0px;padding:0px;white-space:pre-wrap;font-size:13px;line-height:19.5px;background-color:rgb(254,254,242);">#<br style="margin:0px;padding:0px;" />#author:wuhao<br style="margin:0px;padding:0px;" />#<br style="margin:0px;padding:0px;" />#爬取指定页码的图片，如果需要爬取某一类的所有图片，整体框架不变，但需要另作分析<br style="margin:0px;padding:0px;" />#<br style="margin:0px;padding:0px;" />import urllib.request<br style="margin:0px;padding:0px;" />import urllib.parse<br style="margin:0px;padding:0px;" />import re<br style="margin:0px;padding:0px;" />import os<br style="margin:0px;padding:0px;" />#添加header，其中Referer是必须的,否则会返回403错误，User-Agent是必须的，这样才可以伪装成浏览器进行访问<br style="margin:0px;padding:0px;" />header=\</pre>
<div class="cnblogs_code" style="margin:5px 0px;padding:5px;border:1px solid rgb(204,204,204);overflow:auto;font-family:'Courier New' !important;background-color:rgb(245,245,245);">
<pre style="margin-top:0px;margin-bottom:0px;padding:0px;white-space:pre-wrap;font-family:'Courier New' !important;"><span style="margin:0px;padding:0px;line-height:1.5;">{
     </span><span style="margin:0px;padding:0px;line-height:1.5;color:rgb(128,0,0);">'</span><span style="margin:0px;padding:0px;line-height:1.5;color:rgb(128,0,0);">User-Agent</span><span style="margin:0px;padding:0px;line-height:1.5;color:rgb(128,0,0);">'</span>: <span style="margin:0px;padding:0px;line-height:1.5;color:rgb(128,0,0);">'</span><span style="margin:0px;padding:0px;line-height:1.5;color:rgb(128,0,0);">Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36</span><span style="margin:0px;padding:0px;line-height:1.5;color:rgb(128,0,0);">'</span><span style="margin:0px;padding:0px;line-height:1.5;">,
     </span><span style="margin:0px;padding:0px;line-height:1.5;color:rgb(128,0,0);">"</span><span style="margin:0px;padding:0px;line-height:1.5;color:rgb(128,0,0);">referer</span><span style="margin:0px;padding:0px;line-height:1.5;color:rgb(128,0,0);">"</span>:<span style="margin:0px;padding:0px;line-height:1.5;color:rgb(128,0,0);">"</span><span style="margin:0px;padding:0px;line-height:1.5;color:rgb(128,0,0);">https://image.baidu.com</span><span style="margin:0px;padding:0px;line-height:1.5;color:rgb(128,0,0);">"</span><span style="margin:0px;padding:0px;line-height:1.5;">
    }</span></pre>
</div>
<p></p>
<p style="margin:10px auto;padding-top:0px;padding-bottom:0px;line-height:19.5px;font-size:13px;font-family:Verdana, Arial, Helvetica, sans-serif;background-color:rgb(254,254,242);">
 </p>
<pre style="margin-top:0px;margin-bottom:0px;padding:0px;white-space:pre-wrap;font-size:13px;line-height:19.5px;background-color:rgb(254,254,242);">#由于百度图片获取的方式是采用ajax，所以你从正常的url链接只能提取到一个页面显示的图片，也就是前30张（还是前60张）<br style="margin:0px;padding:0px;" />#具体的分析是：你下拉页面滚动条，分析XHR的变化，就可以找到所需要的Json数据，比如说这个就是分析后找的Json数据<br style="margin:0px;padding:0px;" /><a href="https://image.baidu.com/search/acjson?tn=resultjson_com&amp;ipn=rj&amp;ct=201326592&amp;is=&amp;fp=result&amp;queryWord=%E5%BE%AE%E8%B7%9D%E6%91%84%E5%BD%B1&amp;cl=2&amp;lm=-1&amp;ie=utf-8&amp;oe=utf-8&amp;adpicid=&amp;st=-1&amp;z=&amp;ic=0&amp;word=%E5%BE%AE%E8%B7%9D%E6%91%84%E5%BD%B1&amp;s=&amp;se=&amp;tab=&amp;width=&amp;height=&amp;face=0&amp;istype=2&amp;qc=&amp;nc=1&amp;fr=&amp;pn=240&amp;rn=30&amp;gsm=b4&amp;1492507141415=" style="margin:0px;padding:0px;color:rgb(7,93,179);">https://image.baidu.com/search/acjson?tn=resultjson_com&amp;ipn=rj&amp;ct=201326592&amp;is=&amp;fp=result&amp;queryWord=%E5%BE%AE%E8%B7%9D%E6%91%84%E5%BD%B1&amp;cl=2&amp;lm=-1&amp;ie=utf-8&amp;oe=utf-8&amp;adpicid=&amp;st=-1&amp;z=&amp;ic=0&amp;word=%E5%BE%AE%E8%B7%9D%E6%91%84%E5%BD%B1&amp;s=&amp;se=&amp;tab=&amp;width=&amp;height=&amp;face=0&amp;istype=2&amp;qc=&amp;nc=1&amp;fr=&amp;pn=240&amp;rn=30&amp;gsm=b4&amp;1492507141415=</a><br style="margin:0px;padding:0px;" /><br style="margin:0px;padding:0px;" />#而这个链接中的的  <span style="margin:0px;padding:0px;line-height:1.5;color:rgb(255,153,0);"><span style="margin:0px;padding:0px;line-height:1.5;font-size:15px;color:rgb(0,255,0);"><u>rn</u></span> <span style="margin:0px;padding:0px;line-height:1.5;color:rgb(0,0,0);">参数指的是一页包含的图片数量，最多60。 <span style="margin:0px;padding:0px;line-height:1.5;color:rgb(0,255,0);"><span style="margin:0px;padding:0px;line-height:1.5;color:rgb(0,255,255);"><span style="margin:0px;padding:0px;line-height:1.5;text-decoration:underline;">pn</span><span style="margin:0px;padding:0px;line-height:1.5;color:rgb(0,0,0);"> 指得是第多少张  <span style="margin:0px;padding:0px;line-height:1.5;color:rgb(0,0,255);"><u>word</u></span> 指的是搜索的关键字，其它的一些参数是无关紧要的， 当然你需要把其转码</span></span><br style="margin:0px;padding:0px;" /></span></span></span></pre>
<div class="cnblogs_code" style="margin:5px 0px;padding:5px;border:1px solid rgb(204,204,204);overflow:auto;font-family:'Courier New' !important;background-color:rgb(245,245,245);">
<pre style="margin-top:0px;margin-bottom:0px;padding:0px;white-space:pre-wrap;font-family:'Courier New' !important;"><span style="margin:0px;padding:0px;line-height:1.5;color:rgb(128,0,0);">"</span><span style="margin:0px;padding:0px;line-height:1.5;color:rgb(128,0,0);">https://image.baidu.com/search/acjson?tn=resultjson_com&amp;ipn=rj&amp;ct=201326592&amp;is=&amp;fp=result&amp;queryWord={word}&amp;cl=2&amp;lm=-1&amp;ie=utf-8&amp;oe=utf-8&amp;adpicid=&amp;st=-1&amp;z=&amp;ic=0&amp;word={word}&amp;s=&amp;se=&amp;tab=&amp;width=&amp;height=&amp;face=0&amp;istype=2&amp;qc=&amp;nc=1&amp;fr=&amp;cg=girl&amp;pn={pageNum}&amp;rn=30&amp;gsm=1e00000000001e&amp;1490169411926=</span><span style="margin:0px;padding:0px;line-height:1.5;color:rgb(128,0,0);">"</span></pre>
</div>
<pre style="margin-top:0px;margin-bottom:0px;padding:0px;white-space:pre-wrap;font-size:13px;line-height:19.5px;background-color:rgb(254,254,242);"><br style="margin:0px;padding:0px;" />#keyword=input("请输入搜索关键字：")<br style="margin:0px;padding:0px;" />keyword='美女'<br style="margin:0px;padding:0px;" /><br style="margin:0px;padding:0px;" />#转换编码格式<br style="margin:0px;padding:0px;" />keyword=urllib.parse.quote(keyword,"utf-8")<br style="margin:0px;padding:0px;" /><br style="margin:0px;padding:0px;" />#n作为一个flag，用于条件判断<br style="margin:0px;padding:0px;" />n=0<br style="margin:0px;padding:0px;" />#j作为写入图片的识别标志，默认从第0张开始，每写入一张j就+1<br style="margin:0px;padding:0px;" />j=0<br style="margin:0px;padding:0px;" />#<br style="margin:0px;padding:0px;" />error=0<br style="margin:0px;padding:0px;" /><br style="margin:0px;padding:0px;" /><br style="margin:0px;padding:0px;" />#获取前3000张图片<br style="margin:0px;padding:0px;" />while(n&lt;30*100):</pre>
<div class="cnblogs_Highlighter" style="margin:0px;padding:0px;font-family:Verdana, Arial, Helvetica, sans-serif;font-size:13px;line-height:19.5px;background-color:rgb(254,254,242);">
<div class="cnblogs_Highlighter sh-gutter" style="margin:0px;padding:0px;">
<div style="margin:0px;padding:0px;">
<div id="highlighter_671807" class="syntaxhighlighter python" style="margin:1em 0px !important;padding:0px;overflow:auto !important;font-size:1em !important;background-color:rgb(255,255,255) !important;">
<table border="0" cellpadding="0" cellspacing="0" style="border:1px solid #C0C0C0;border-collapse:collapse;margin:0px !important;padding:0px !important;float:none !important;line-height:1.1em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;font-size:12px !important;min-height:auto !important;background:none !important;"><tbody style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.1em !important;overflow:visible !important;vertical-align:baseline !important;min-height:auto !important;background:none !important;"><tr style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.1em !important;overflow:visible !important;vertical-align:baseline !important;min-height:auto !important;background:none !important;"><td class="gutter" style="padding:3px;border:1px solid #C0C0C0;border-collapse:collapse;margin:0px !important;float:none !important;line-height:1.1em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:rgb(175,175,175) !important;background:none !important;">
<div class="line number1 index0 alt2" style="margin:0px !important;padding:0px .5em !important;border-width:0px 2px 0px 0px !important;border-right-style:solid !important;border-right-color:rgb(108,226,108) !important;float:none !important;line-height:1.8em !important;overflow:visible !important;text-align:right !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;background:rgb(244,244,244) none !important;">
1</div>
<div class="line number2 index1 alt1" style="margin:0px !important;padding:0px .5em !important;border-width:0px 2px 0px 0px !important;border-right-style:solid !important;border-right-color:rgb(108,226,108) !important;float:none !important;line-height:1.8em !important;overflow:visible !important;text-align:right !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;">
2</div>
<div class="line number3 index2 alt2" style="margin:0px !important;padding:0px .5em !important;border-width:0px 2px 0px 0px !important;border-right-style:solid !important;border-right-color:rgb(108,226,108) !important;float:none !important;line-height:1.8em !important;overflow:visible !important;text-align:right !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;background:rgb(244,244,244) none !important;">
3</div>
<div class="line number4 index3 alt1" style="margin:0px !important;padding:0px .5em !important;border-width:0px 2px 0px 0px !important;border-right-style:solid !important;border-right-color:rgb(108,226,108) !important;float:none !important;line-height:1.8em !important;overflow:visible !important;text-align:right !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;">
4</div>
<div class="line number5 index4 alt2" style="margin:0px !important;padding:0px .5em !important;border-width:0px 2px 0px 0px !important;border-right-style:solid !important;border-right-color:rgb(108,226,108) !important;float:none !important;line-height:1.8em !important;overflow:visible !important;text-align:right !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;background:rgb(244,244,244) none !important;">
5</div>
<div class="line number6 index5 alt1" style="margin:0px !important;padding:0px .5em !important;border-width:0px 2px 0px 0px !important;border-right-style:solid !important;border-right-color:rgb(108,226,108) !important;float:none !important;line-height:1.8em !important;overflow:visible !important;text-align:right !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;">
6</div>
<div class="line number7 index6 alt2" style="margin:0px !important;padding:0px .5em !important;border-width:0px 2px 0px 0px !important;border-right-style:solid !important;border-right-color:rgb(108,226,108) !important;float:none !important;line-height:1.8em !important;overflow:visible !important;text-align:right !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;background:rgb(244,244,244) none !important;">
7</div>
<div class="line number8 index7 alt1" style="margin:0px !important;padding:0px .5em !important;border-width:0px 2px 0px 0px !important;border-right-style:solid !important;border-right-color:rgb(108,226,108) !important;float:none !important;line-height:1.8em !important;overflow:visible !important;text-align:right !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;">
8</div>
<div class="line number9 index8 alt2" style="margin:0px !important;padding:0px .5em !important;border-width:0px 2px 0px 0px !important;border-right-style:solid !important;border-right-color:rgb(108,226,108) !important;float:none !important;line-height:1.8em !important;overflow:visible !important;text-align:right !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;background:rgb(244,244,244) none !important;">
9</div>
<div class="line number10 index9 alt1" style="margin:0px !important;padding:0px .5em !important;border-width:0px 2px 0px 0px !important;border-right-style:solid !important;border-right-color:rgb(108,226,108) !important;float:none !important;line-height:1.8em !important;overflow:visible !important;text-align:right !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;">
10</div>
<div class="line number11 index10 alt2" style="margin:0px !important;padding:0px .5em !important;border-width:0px 2px 0px 0px !important;border-right-style:solid !important;border-right-color:rgb(108,226,108) !important;float:none !important;line-height:1.8em !important;overflow:visible !important;text-align:right !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;background:rgb(244,244,244) none !important;">
11</div>
<div class="line number12 index11 alt1" style="margin:0px !important;padding:0px .5em !important;border-width:0px 2px 0px 0px !important;border-right-style:solid !important;border-right-color:rgb(108,226,108) !important;float:none !important;line-height:1.8em !important;overflow:visible !important;text-align:right !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;">
12</div>
<div class="line number13 index12 alt2" style="margin:0px !important;padding:0px .5em !important;border-width:0px 2px 0px 0px !important;border-right-style:solid !important;border-right-color:rgb(108,226,108) !important;float:none !important;line-height:1.8em !important;overflow:visible !important;text-align:right !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;background:rgb(244,244,244) none !important;">
13</div>
<div class="line number14 index13 alt1" style="margin:0px !important;padding:0px .5em !important;border-width:0px 2px 0px 0px !important;border-right-style:solid !important;border-right-color:rgb(108,226,108) !important;float:none !important;line-height:1.8em !important;overflow:visible !important;text-align:right !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;">
14</div>
<div class="line number15 index14 alt2" style="margin:0px !important;padding:0px .5em !important;border-width:0px 2px 0px 0px !important;border-right-style:solid !important;border-right-color:rgb(108,226,108) !important;float:none !important;line-height:1.8em !important;overflow:visible !important;text-align:right !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;background:rgb(244,244,244) none !important;">
15</div>
<div class="line number16 index15 alt1" style="margin:0px !important;padding:0px .5em !important;border-width:0px 2px 0px 0px !important;border-right-style:solid !important;border-right-color:rgb(108,226,108) !important;float:none !important;line-height:1.8em !important;overflow:visible !important;text-align:right !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;">
16</div>
<div class="line number17 index16 alt2" style="margin:0px !important;padding:0px .5em !important;border-width:0px 2px 0px 0px !important;border-right-style:solid !important;border-right-color:rgb(108,226,108) !important;float:none !important;line-height:1.8em !important;overflow:visible !important;text-align:right !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;background:rgb(244,244,244) none !important;">
17</div>
<div class="line number18 index17 alt1" style="margin:0px !important;padding:0px .5em !important;border-width:0px 2px 0px 0px !important;border-right-style:solid !important;border-right-color:rgb(108,226,108) !important;float:none !important;line-height:1.8em !important;overflow:visible !important;text-align:right !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;">
18</div>
<div class="line number19 index18 alt2" style="margin:0px !important;padding:0px .5em !important;border-width:0px 2px 0px 0px !important;border-right-style:solid !important;border-right-color:rgb(108,226,108) !important;float:none !important;line-height:1.8em !important;overflow:visible !important;text-align:right !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;background:rgb(244,244,244) none !important;">
19</div>
<div class="line number20 index19 alt1" style="margin:0px !important;padding:0px .5em !important;border-width:0px 2px 0px 0px !important;border-right-style:solid !important;border-right-color:rgb(108,226,108) !important;float:none !important;line-height:1.8em !important;overflow:visible !important;text-align:right !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;">
20</div>
<div class="line number21 index20 alt2" style="margin:0px !important;padding:0px .5em !important;border-width:0px 2px 0px 0px !important;border-right-style:solid !important;border-right-color:rgb(108,226,108) !important;float:none !important;line-height:1.8em !important;overflow:visible !important;text-align:right !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;background:rgb(244,244,244) none !important;">
21</div>
<div class="line number22 index21 alt1" style="margin:0px !important;padding:0px .5em !important;border-width:0px 2px 0px 0px !important;border-right-style:solid !important;border-right-color:rgb(108,226,108) !important;float:none !important;line-height:1.8em !important;overflow:visible !important;text-align:right !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;">
22</div>
<div class="line number23 index22 alt2" style="margin:0px !important;padding:0px .5em !important;border-width:0px 2px 0px 0px !important;border-right-style:solid !important;border-right-color:rgb(108,226,108) !important;float:none !important;line-height:1.8em !important;overflow:visible !important;text-align:right !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;background:rgb(244,244,244) none !important;">
23</div>
<div class="line number24 index23 alt1" style="margin:0px !important;padding:0px .5em !important;border-width:0px 2px 0px 0px !important;border-right-style:solid !important;border-right-color:rgb(108,226,108) !important;float:none !important;line-height:1.8em !important;overflow:visible !important;text-align:right !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;">
24</div>
<div class="line number25 index24 alt2" style="margin:0px !important;padding:0px .5em !important;border-width:0px 2px 0px 0px !important;border-right-style:solid !important;border-right-color:rgb(108,226,108) !important;float:none !important;line-height:1.8em !important;overflow:visible !important;text-align:right !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;background:rgb(244,244,244) none !important;">
25</div>
<div class="line number26 index25 alt1" style="margin:0px !important;padding:0px .5em !important;border-width:0px 2px 0px 0px !important;border-right-style:solid !important;border-right-color:rgb(108,226,108) !important;float:none !important;line-height:1.8em !important;overflow:visible !important;text-align:right !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;">
26</div>
<div class="line number27 index26 alt2" style="margin:0px !important;padding:0px .5em !important;border-width:0px 2px 0px 0px !important;border-right-style:solid !important;border-right-color:rgb(108,226,108) !important;float:none !important;line-height:1.8em !important;overflow:visible !important;text-align:right !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;background:rgb(244,244,244) none !important;">
27</div>
<div class="line number28 index27 alt1" style="margin:0px !important;padding:0px .5em !important;border-width:0px 2px 0px 0px !important;border-right-style:solid !important;border-right-color:rgb(108,226,108) !important;float:none !important;line-height:1.8em !important;overflow:visible !important;text-align:right !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;">
28</div>
<div class="line number29 index28 alt2" style="margin:0px !important;padding:0px .5em !important;border-width:0px 2px 0px 0px !important;border-right-style:solid !important;border-right-color:rgb(108,226,108) !important;float:none !important;line-height:1.8em !important;overflow:visible !important;text-align:right !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;background:rgb(244,244,244) none !important;">
29</div>
<div class="line number30 index29 alt1" style="margin:0px !important;padding:0px .5em !important;border-width:0px 2px 0px 0px !important;border-right-style:solid !important;border-right-color:rgb(108,226,108) !important;float:none !important;line-height:1.8em !important;overflow:visible !important;text-align:right !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;">
30</div>
<div class="line number31 index30 alt2" style="margin:0px !important;padding:0px .5em !important;border-width:0px 2px 0px 0px !important;border-right-style:solid !important;border-right-color:rgb(108,226,108) !important;float:none !important;line-height:1.8em !important;overflow:visible !important;text-align:right !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;background:rgb(244,244,244) none !important;">
31</div>
</td>
<td class="code" style="padding:3px;border:1px solid #C0C0C0;border-collapse:collapse;margin:0px !important;float:none !important;line-height:1.1em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">
<div class="container" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.1em !important;overflow:visible !important;vertical-align:baseline !important;min-height:auto !important;background:none !important;">
<div class="line number1 index0 alt2" style="margin:0px !important;padding:0px 1em !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;background:rgb(244,244,244) none !important;">
<code class="python plain" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">n</code><code class="python keyword" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:rgb(0,0,255) !important;background:none !important;">+</code><code class="python keyword" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:rgb(0,0,255) !important;background:none !important;">=</code><code class="python value" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:rgb(0,153,0) !important;background:none !important;">30</code></div>
<div class="line number2 index1 alt1" style="margin:0px !important;padding:0px 1em !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;">
<code class="python spaces" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">    </code><code class="python comments" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:rgb(0,130,0) !important;background:none !important;">#url链接</code></div>
<div class="line number3 index2 alt2" style="margin:0px !important;padding:0px 1em !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;background:rgb(244,244,244) none !important;">
<code class="python spaces" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">    </code><code class="python plain" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">url1</code><code class="python keyword" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:rgb(0,0,255) !important;background:none !important;">=</code><code class="python plain" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">url.</code><code class="python functions" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:rgb(255,20,147) !important;background:none !important;">format</code><code class="python plain" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">(word</code><code class="python keyword" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:rgb(0,0,255) !important;background:none !important;">=</code><code class="python plain" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">keyword,pageNum</code><code class="python keyword" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:rgb(0,0,255) !important;background:none !important;">=</code><code class="python functions" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:rgb(255,20,147) !important;background:none !important;">str</code><code class="python plain" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">(n))</code></div>
<div class="line number4 index3 alt1" style="margin:0px !important;padding:0px 1em !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;">
 </div>
<div class="line number5 index4 alt2" style="margin:0px !important;padding:0px 1em !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;background:rgb(244,244,244) none !important;">
<code class="python spaces" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">    </code><code class="python comments" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:rgb(0,130,0) !important;background:none !important;">#获取请求</code></div>
<div class="line number6 index5 alt1" style="margin:0px !important;padding:0px 1em !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;">
<code class="python spaces" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">    </code><code class="python plain" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">rep</code><code class="python keyword" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:rgb(0,0,255) !important;background:none !important;">=</code><code class="python plain" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">urllib.request.Request(url1,headers</code><code class="python keyword" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:rgb(0,0,255) !important;background:none !important;">=</code><code class="python plain" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">header)</code></div>
<div class="line number7 index6 alt2" style="margin:0px !important;padding:0px 1em !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;background:rgb(244,244,244) none !important;">
<code class="python spaces" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">    </code><code class="python comments" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:rgb(0,130,0) !important;background:none !important;">#打开网页</code></div>
<div class="line number8 index7 alt1" style="margin:0px !important;padding:0px 1em !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;">
<code class="python spaces" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">    </code><code class="python plain" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">rep</code><code class="python keyword" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:rgb(0,0,255) !important;background:none !important;">=</code><code class="python plain" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">urllib.request.urlopen(rep)</code></div>
<div class="line number9 index8 alt2" style="margin:0px !important;padding:0px 1em !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;background:rgb(244,244,244) none !important;">
<code class="python spaces" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">    </code><code class="python comments" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:rgb(0,130,0) !important;background:none !important;">#读取网页数据</code></div>
<div class="line number10 index9 alt1" style="margin:0px !important;padding:0px 1em !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;">
<code class="python spaces" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">    </code><code class="python keyword" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:rgb(0,0,255) !important;background:none !important;">try</code><code class="python plain" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">:</code></div>
<div class="line number11 index10 alt2" style="margin:0px !important;padding:0px 1em !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;background:rgb(244,244,244) none !important;">
<code class="python spaces" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">        </code><code class="python plain" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">html</code><code class="python keyword" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:rgb(0,0,255) !important;background:none !important;">=</code><code class="python plain" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">rep.read().decode(</code><code class="python string" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:#0000FF !important;background:none !important;">"utf-8"</code><code class="python plain" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">)</code></div>
<div class="line number12 index11 alt1" style="margin:0px !important;padding:0px 1em !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;">
<code class="python spaces" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">    </code><code class="python keyword" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:rgb(0,0,255) !important;background:none !important;">except</code><code class="python plain" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">:</code></div>
<div class="line number13 index12 alt2" style="margin:0px !important;padding:0px 1em !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;background:rgb(244,244,244) none !important;">
<code class="python spaces" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">        </code><code class="python functions" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:rgb(255,20,147) !important;background:none !important;">print</code><code class="python plain" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">(</code><code class="python string" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:#0000FF !important;background:none !important;">"something
 wrong!"</code><code class="python plain" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">)</code></div>
<div class="line number14 index13 alt1" style="margin:0px !important;padding:0px 1em !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;">
<code class="python spaces" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">        </code><code class="python plain" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">error</code><code class="python keyword" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:rgb(0,0,255) !important;background:none !important;">=</code><code class="python value" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:rgb(0,153,0) !important;background:none !important;">1</code></div>
<div class="line number15 index14 alt2" style="margin:0px !important;padding:0px 1em !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;background:rgb(244,244,244) none !important;">
<code class="python spaces" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">        </code><code class="python functions" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:rgb(255,20,147) !important;background:none !important;">print</code><code class="python plain" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">(</code><code class="python string" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:#0000FF !important;background:none !important;">"-------------now
 page ="</code><code class="python keyword" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:rgb(0,0,255) !important;background:none !important;">+</code><code class="python functions" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:rgb(255,20,147) !important;background:none !important;">str</code><code class="python plain" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">(n))</code></div>
<div class="line number16 index15 alt1" style="margin:0px !important;padding:0px 1em !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;">
<code class="python spaces" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">    </code><code class="python keyword" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:rgb(0,0,255) !important;background:none !important;">if</code><code class="python plain" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">(error</code><code class="python keyword" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:rgb(0,0,255) !important;background:none !important;">=</code><code class="python keyword" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:rgb(0,0,255) !important;background:none !important;">=</code><code class="python value" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:rgb(0,153,0) !important;background:none !important;">1</code><code class="python plain" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">): </code><code class="python keyword" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:rgb(0,0,255) !important;background:none !important;">continue</code></div>
<div class="line number17 index16 alt2" style="margin:0px !important;padding:0px 1em !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;background:rgb(244,244,244) none !important;">
<code class="python spaces" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">    </code><code class="python comments" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:rgb(0,130,0) !important;background:none !important;">#正则匹配，你需要的资源都是在
 像这样的里面("thumbURL":"https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=3734503404,179583637&amp;fm=23&amp;gp=0.jpg")</code></div>
<div class="line number18 index17 alt1" style="margin:0px !important;padding:0px 1em !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;">
<code class="python spaces" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">    </code><code class="python plain" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">p</code><code class="python keyword" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:rgb(0,0,255) !important;background:none !important;">=</code><code class="python plain" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">re.</code><code class="python functions" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:rgb(255,20,147) !important;background:none !important;">compile</code><code class="python plain" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">(</code><code class="python string" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:#0000FF !important;background:none !important;">"thumbURL.*?\.jpg"</code><code class="python plain" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">)　　</code></div>
<div class="line number19 index18 alt2" style="margin:0px !important;padding:0px 1em !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;background:rgb(244,244,244) none !important;">
<code class="python spaces" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">    </code><code class="python comments" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:rgb(0,130,0) !important;background:none !important;">#获取正则匹配结果，返回的是一个list</code></div>
<div class="line number20 index19 alt1" style="margin:0px !important;padding:0px 1em !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;">
<code class="python spaces" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">    </code><code class="python plain" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">s</code><code class="python keyword" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:rgb(0,0,255) !important;background:none !important;">=</code><code class="python plain" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">p.findall(html)</code></div>
<div class="line number21 index20 alt2" style="margin:0px !important;padding:0px 1em !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;background:rgb(244,244,244) none !important;">
<code class="python spaces" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">    </code><code class="python comments" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:rgb(0,130,0) !important;background:none !important;">#如果不路径存在，创建路径，最后的图片保存在此路径下</code></div>
<div class="line number22 index21 alt1" style="margin:0px !important;padding:0px 1em !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;">
<code class="python spaces" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">    </code><code class="python keyword" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:rgb(0,0,255) !important;background:none !important;">if</code> <code class="python plain" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">os.path.isdir(</code><code class="python string" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:#0000FF !important;background:none !important;">"f:\\myproject\\MyCrawlPic\\美女"</code><code class="python plain" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">)!</code><code class="python keyword" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:rgb(0,0,255) !important;background:none !important;">=</code><code class="python color1" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:#808080 !important;background:none !important;">True</code><code class="python plain" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">:</code></div>
<div class="line number23 index22 alt2" style="margin:0px !important;padding:0px 1em !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;background:rgb(244,244,244) none !important;">
<code class="python spaces" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">        </code><code class="python plain" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">os.makedirs(r</code><code class="python string" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:#0000FF !important;background:none !important;">"f:\\myproject\\MyCrawlPic\\美女"</code><code class="python plain" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">)</code></div>
<div class="line number24 index23 alt1" style="margin:0px !important;padding:0px 1em !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;">
<code class="python spaces" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">    </code><code class="python plain" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">with </code><code class="python functions" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:rgb(255,20,147) !important;background:none !important;">open</code><code class="python plain" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">(</code><code class="python string" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:#0000FF !important;background:none !important;">"testPic1.txt"</code><code class="python plain" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">,</code><code class="python string" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:#0000FF !important;background:none !important;">"w"</code><code class="python plain" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">)
 as f:</code></div>
<div class="line number25 index24 alt2" style="margin:0px !important;padding:0px 1em !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;background:rgb(244,244,244) none !important;">
<code class="python spaces" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">        </code><code class="python keyword" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:rgb(0,0,255) !important;background:none !important;">for</code> <code class="python plain" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">i </code><code class="python keyword" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:rgb(0,0,255) !important;background:none !important;">in</code> <code class="python plain" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">s:　　　　　　　</code><code class="python comments" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:rgb(0,130,0) !important;background:none !important;">#获取图片的url</code></div>
<div class="line number26 index25 alt1" style="margin:0px !important;padding:0px 1em !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;">
<code class="python spaces" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">            </code><code class="python plain" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">i</code><code class="python keyword" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:rgb(0,0,255) !important;background:none !important;">=</code><code class="python plain" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">i.replace(</code><code class="python string" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:#0000FF !important;background:none !important;">"thumbURL\":\""</code><code class="python plain" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">,"")　　　　　　　</code><code class="python comments" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:rgb(0,130,0) !important;background:none !important;">#在IDE上显示，打印的结果</code></div>
<div class="line number27 index26 alt2" style="margin:0px !important;padding:0px 1em !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;background:rgb(244,244,244) none !important;">
<code class="python spaces" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">            </code><code class="python functions" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:rgb(255,20,147) !important;background:none !important;">print</code><code class="python plain" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">(i)　　　　　　　</code><code class="python comments" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:rgb(0,130,0) !important;background:none !important;">#保存图片的URL链接，当然你大可不必多此一举</code></div>
<div class="line number28 index27 alt1" style="margin:0px !important;padding:0px 1em !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;">
<code class="python spaces" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">            </code><code class="python plain" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">f.write(i)</code></div>
<div class="line number29 index28 alt2" style="margin:0px !important;padding:0px 1em !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;background:rgb(244,244,244) none !important;">
<code class="python spaces" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">            </code><code class="python plain" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">f.write(</code><code class="python string" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:#0000FF !important;background:none !important;">"\n"</code><code class="python plain" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">)　　　　　　　</code><code class="python comments" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:rgb(0,130,0) !important;background:none !important;">#进行写入图片</code></div>
<div class="line number30 index29 alt1" style="margin:0px !important;padding:0px 1em !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;">
<code class="python spaces" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">            </code><code class="python plain" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">urllib.request.urlretrieve(i,</code><code class="python string" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:#0000FF !important;background:none !important;">"f:\\myproject\\MyCrawlPic\\美女\\pic{num}.jpg"</code><code class="python plain" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">.</code><code class="python functions" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:rgb(255,20,147) !important;background:none !important;">format</code><code class="python plain" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">(num</code><code class="python keyword" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:rgb(0,0,255) !important;background:none !important;">=</code><code class="python plain" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">j))</code></div>
<div class="line number31 index30 alt2" style="margin:0px !important;padding:0px 1em !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;min-height:auto !important;white-space:nowrap !important;background:rgb(244,244,244) none !important;">
<code class="python spaces" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">            </code><code class="python plain" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">j</code><code class="python keyword" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:rgb(0,0,255) !important;background:none !important;">+</code><code class="python keyword" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:rgb(0,0,255) !important;background:none !important;">=</code><code class="python value" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;color:rgb(0,153,0) !important;background:none !important;">1</code><code class="python plain" style="margin:0px !important;padding:0px !important;border:0px !important;float:none !important;line-height:1.8em !important;overflow:visible !important;vertical-align:baseline !important;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;min-height:auto !important;background:none !important;">　　</code></div>
</div>
</td>
</tr></tbody></table></div>
</div>
</div>
</div>
<br />                    </div>
    </article>
      <div class="readall_box csdn-tracking-statistics tracking-click" data-mod="popu_376">
          <div class="read_more_mask"></div>
          <a class="btn btn-large btn-gray-fred read_more_btn" target="_self">阅读全文</a>
      </div>
      <div class="article_copyright">
              </div>
      <ul class="article_collect clearfix csdn-tracking-statistics tracking-click"  data-mod="popu_378">
          <li class="tit">本文已收录于以下专栏：</li>
<!--          [startarticlecolumns]-->
                                <!--          [endarticlecolumns]-->
      </ul>
      <div class="comment_box clearfix" id="comments">
          <div id="comment_form">
              <div id="commentsbmitarear">
                              </div>
          </div>
      </div>
      <div class="comment_li_outbox">
          <div id="comment_list"></div>
      </div>

      <div class="more_comment">
          <div id="comment_bar" class="trackgin-ad" data-mod="popu_385"></div>
      </div>

      <!-- <h3 class="recommend_tit" id="related">相关文章推荐</h3> -->
      <div class="recommend_list clearfix" id="rasss">
                                                                        <dl class="clearfix csdn-tracking-statistics recommend_article" data-mod="popu_387" data-poputype="feed"  data-feed-show="false"  data-dsm="post">
                      <a href="http://blog.csdn.net/Jason__Liang/article/details/54893635"  target="_blank" strategy="BlogCommendFromBaidu_0">
                        <dd class="clearfix">
                          <h2 class="">Python3 百度图片 美女 下载 爬虫 多线程</h2>
                          <div class="summary">
                              本人电子系，只为一学生。心喜计算机，小编以怡情。
  说明：下载百度图片中的美女图片
  
  修改：默认url都已经写好了，只需要改一下cookies就可食用
  
  附加：运用了多线程，一个线程...                          </div>

                          <ul class="">
                              <li class="avatar_img"><img src="http://avatar.csdn.net/B/C/7/3_jason__liang.jpg" alt="Jason__Liang" title="Jason__Liang"/></li>
                              <li class="user_name">Jason__Liang</li>
                              <li class="time">2017年02月06日 15:41</li>
                              <li class="visited_num"><i class="icon iconfont icon-read"></i><span>860</span></li>
                          </ul>
                        </dd>
                      </a>
                  </dl>
                                                                                      <dl class="clearfix csdn-tracking-statistics recommend_article" data-mod="popu_387" data-poputype="feed"  data-feed-show="false"  data-dsm="post">
                      <a href="http://blog.csdn.net/cairo123/article/details/52775420"  target="_blank" strategy="BlogCommendFromBaidu_1">
                        <dd class="clearfix">
                          <h2 class="">百度图片小爬虫</h2>
                          <div class="summary">
                              请求分析
Python环境的配置
爬虫的编写
编辑器的选择
参数检查
图片搜索
请求数据
下载图片
结束
效果演示
脚本执行演示
结果演示
代码链接
  iOS行业不好混了，公司现在基本没什么事做了。...                          </div>

                          <ul class="">
                              <li class="avatar_img"><img src="http://avatar.csdn.net/2/D/7/3_cairo123.jpg" alt="cairo123" title="cairo123"/></li>
                              <li class="user_name">cairo123</li>
                              <li class="time">2016年10月10日 10:38</li>
                              <li class="visited_num"><i class="icon iconfont icon-read"></i><span>4617</span></li>
                          </ul>
                        </dd>
                      </a>
                  </dl>
                                                                      <dl class="">
                  <script>
                  (function() {
                    var s = "_" + Math.random().toString(36).slice(2);
                    document.write('<div id="' + s + '"></div>');
                    (window.slotbydup=window.slotbydup || []).push({
                      id: '4765209',
                      container: s,
                      size: '808,120',
                      display: 'inlay-fix'
                    });
                  })();
                  </script>
                </dl>
                                                                <dl class="clearfix csdn-tracking-statistics recommend_article" data-mod="popu_387" data-poputype="feed"  data-feed-show="false"  data-dsm="post">
                      <a href="http://blog.csdn.net/zhou8622/article/details/44019291"  target="_blank" strategy="searchFromBaidu_2">
                        <dd class="clearfix">
                          <h2 class="">百度图片api</h2>
                          <div class="summary">
                              一。百度图片API的使用首先, 我们知道百度是没有对外开放图片API的, 但是我们可以通过谷歌浏览器来捕捉到访问过程中它调用的API。有兴趣的, 可以了解下谷歌浏览器Network选项的使用, 也可以...                          </div>

                          <ul class="">
                              <li class="avatar_img"><img src="http://avatar.csdn.net/7/A/9/3_zhou8622.jpg" alt="zhou8622" title="zhou8622"/></li>
                              <li class="user_name">zhou8622</li>
                              <li class="time">2015年03月02日 15:49</li>
                              <li class="visited_num"><i class="icon iconfont icon-read"></i><span>3100</span></li>
                          </ul>
                        </dd>
                      </a>
                  </dl>
                                                                                      <dl class="clearfix csdn-tracking-statistics recommend_article" data-mod="popu_387" data-poputype="feed"  data-feed-show="false"  data-dsm="post">
                      <a href="http://blog.csdn.net/dadouxiaodou/article/details/54312555"  target="_blank" strategy="searchFromBaidu_3">
                        <dd class="clearfix">
                          <h2 class="">百度图片API</h2>
                          <div class="summary">
                              百度图片有分类图片api和搜索api


- 百度图片分类图片api




以GET形式提交，返回JSON

URL：http://image.baidu.com/data/im...                          </div>

                          <ul class="">
                              <li class="avatar_img"><img src="http://avatar.csdn.net/3/C/4/3_dadouxiaodou.jpg" alt="dadouxiaodou" title="dadouxiaodou"/></li>
                              <li class="user_name">dadouxiaodou</li>
                              <li class="time">2017年01月10日 12:02</li>
                              <li class="visited_num"><i class="icon iconfont icon-read"></i><span>297</span></li>
                          </ul>
                        </dd>
                      </a>
                  </dl>
                                                                                      <dl class="clearfix csdn-tracking-statistics recommend_article" data-mod="popu_387" data-poputype="feed"  data-feed-show="false"  data-dsm="post">
                      <a href="http://blog.csdn.net/lenovo403/article/details/50721609"  target="_blank" strategy="BlogCommendFromBaidu_4">
                        <dd class="clearfix">
                          <h2 class="">python爬虫（抓取百度图片）</h2>
                          <div class="summary">
                              一、python请求要抓取的url页面


【%E7%BE%8E%E5%A5%B3】urlcode解码之后就是【美女】 可以看到这是百度图片的api接口 ：http://image.baidu....                          </div>

                          <ul class="">
                              <li class="avatar_img"><img src="http://avatar.csdn.net/9/6/B/3_lenovo403.jpg" alt="lenovo403" title="lenovo403"/></li>
                              <li class="user_name">lenovo403</li>
                              <li class="time">2016年02月23日 11:05</li>
                              <li class="visited_num"><i class="icon iconfont icon-read"></i><span>10308</span></li>
                          </ul>
                        </dd>
                      </a>
                  </dl>
                                                                                      <dl class="clearfix csdn-tracking-statistics recommend_article" data-mod="popu_387" data-poputype="feed"  data-feed-show="false"  data-dsm="post">
                      <a href="http://blog.csdn.net/chenpenghuan/article/details/70332781"  target="_blank" strategy="BlogCommendFromBaidu_5">
                        <dd class="clearfix">
                          <h2 class="">按关键字爬取百度图片</h2>
                          <div class="summary">
                              使用requests包与百度图片服务器进行交互，得到返回的json数据后进行解析，最终获得百度图片的实际地址import requests
from fake_useragent import Use...                          </div>

                          <ul class="">
                              <li class="avatar_img"><img src="http://avatar.csdn.net/5/B/A/3_chenpenghuan.jpg" alt="chenpenghuan" title="chenpenghuan"/></li>
                              <li class="user_name">chenpenghuan</li>
                              <li class="time">2017年04月21日 17:47</li>
                              <li class="visited_num"><i class="icon iconfont icon-read"></i><span>850</span></li>
                          </ul>
                        </dd>
                      </a>
                  </dl>
                                                                                      <dl class="clearfix csdn-tracking-statistics recommend_article" data-mod="popu_387" data-poputype="feed"  data-feed-show="false"  data-dsm="post">
                      <a href="http://blog.csdn.net/PROGRAM_anywhere/article/details/72861726"  target="_blank" strategy="BlogCommendFromBaidu_6">
                        <dd class="clearfix">
                          <h2 class="">scrapy爬虫【4】→爬百度美女图</h2>
                          <div class="summary">
                              本来这篇文章不想爬百度的，但是想到有人可能看到我上一篇博客之后，回去自己去爬百度美眉图我也敢说，有很大一部分人学习爬虫都有爬百度美眉的想法，不然会感觉世界缺少了点啥，O(∩_∩)O哈哈~上一篇文章也说...                          </div>

                          <ul class="">
                              <li class="avatar_img"><img src="http://avatar.csdn.net/4/B/9/3_program_anywhere.jpg" alt="PROGRAM_anywhere" title="PROGRAM_anywhere"/></li>
                              <li class="user_name">PROGRAM_anywhere</li>
                              <li class="time">2017年06月04日 21:35</li>
                              <li class="visited_num"><i class="icon iconfont icon-read"></i><span>1570</span></li>
                          </ul>
                        </dd>
                      </a>
                  </dl>
                                                                                      <dl class="clearfix csdn-tracking-statistics recommend_article" data-mod="popu_387" data-poputype="feed"  data-feed-show="false"  data-dsm="post">
                      <a href="http://blog.csdn.net/qq_23228315/article/details/72667802"  target="_blank" strategy="BlogCommendFromBaidu_7">
                        <dd class="clearfix">
                          <h2 class="">Scrapy爬取百度图片（一）</h2>
                          <div class="summary">
                              Scrapy爬百度图片（一）本人小白一个，最近初学scrapy，所以边学边记录咯！Scrapy入门 
关于这部分我不能提供更多帮助哈哈哈！参考http://scrapy-chs.readthedocs...                          </div>

                          <ul class="">
                              <li class="avatar_img"><img src="http://avatar.csdn.net/9/B/1/3_qq_23228315.jpg" alt="qq_23228315" title="qq_23228315"/></li>
                              <li class="user_name">qq_23228315</li>
                              <li class="time">2017年05月23日 22:07</li>
                              <li class="visited_num"><i class="icon iconfont icon-read"></i><span>757</span></li>
                          </ul>
                        </dd>
                      </a>
                  </dl>
                                                                                      <dl class="clearfix csdn-tracking-statistics recommend_article" data-mod="popu_387" data-poputype="feed"  data-feed-show="false"  data-dsm="post">
                      <a href="http://blog.csdn.net/zhyh1435589631/article/details/51804406"  target="_blank" strategy="BlogCommendFromBaidu_8">
                        <dd class="clearfix">
                          <h2 class="">利用selenium 实现对百度图片搜索中的图片的抓取</h2>
                          <div class="summary">
                              1. 前言我们一直非常希望可以抓取百度图片上的图片， 自打我们接触了 python的urllib 库之后， 我们就非常想爬些图片下来， 尤其是从百度图片上面， 在很久之前， 百度图片上的图片是不加密的...                          </div>

                          <ul class="">
                              <li class="avatar_img"><img src="http://avatar.csdn.net/4/7/F/3_zhyh1435589631.jpg" alt="zhyh1435589631" title="zhyh1435589631"/></li>
                              <li class="user_name">zhyh1435589631</li>
                              <li class="time">2016年07月01日 21:48</li>
                              <li class="visited_num"><i class="icon iconfont icon-read"></i><span>5231</span></li>
                          </ul>
                        </dd>
                      </a>
                  </dl>
                                                                                      <dl class="clearfix csdn-tracking-statistics recommend_article" data-mod="popu_387" data-poputype="feed"  data-feed-show="false"  data-dsm="post">
                      <a href="http://blog.csdn.net/lcj1105/article/details/51279222"  target="_blank" strategy="BlogCommendFromBaidu_9">
                        <dd class="clearfix">
                          <h2 class="">Python3爬虫百度图片搜索的图片</h2>
                          <div class="summary">
                              First ! 注意啊，是Python3啊！ 这个坑的我很惨...


但是我们大多数人用的还是Python2，所以可以让Python2和Python3共存


方法如下：
-------------...                          </div>

                          <ul class="">
                              <li class="avatar_img"><img src="http://avatar.csdn.net/8/2/B/3_lcj1105.jpg" alt="lcj1105" title="lcj1105"/></li>
                              <li class="user_name">lcj1105</li>
                              <li class="time">2016年04月29日 09:19</li>
                              <li class="visited_num"><i class="icon iconfont icon-read"></i><span>2470</span></li>
                          </ul>
                        </dd>
                      </a>
                  </dl>
                                                    <!-- <script async="async" charset="utf-8" src="https://shared.ydstatic.com/js/yatdk/3.0.0/stream.js" data-notify="bannerMulti_notify" data-insert-nodes="yd_a_d_feed_1,yd_a_d_feed_13,yd_a_d_feed_18,yd_a_d_feed_23,yd_a_d_feed_28,yd_a_d_feed_33" data-id="8935aa488dd58452b9e5ee3b44f1212f" data-hide-ad-label="0" data-div-Style="width:100%;padding:16px 35px 16px 10px;" data-img-Style="float:right;width:120px;" data-tit-Style="font-size:20px;font-weight:bold;margin-bottom:10px;font-family: 'PingFang SC', 'Microsoft YaHei', SimHei, Arial, SimSun;" data-des-Style="width:700px;font-size:14px;font-family: 'PingFang SC', 'Microsoft YaHei', SimHei, Arial, SimSun;" > </script> -->
      
      </div>
  </main>
<aside>
    <div class="right_box user_info">
    <dl class="inf_bar clearfix">
        <dt class="csdn-tracking-statistics tracking-click" data-mod="popu_381">
        <a href="http://blog.csdn.net/chencaw" target="_blank">
            <img src="http://avatar.csdn.net/D/6/8/3_chencaw.jpg" class="avatar_pic">
        </a>
      </dt><dd>
            <h3 class="csdn-tracking-statistics tracking-click"  data-mod="popu_380"><a href="http://blog.csdn.net/chencaw" target="_blank" id="uid">chencaw</a></h3>
            <div class="medals" title="">
                      </div>
                        <span  class="csdn-tracking-statistics tracking-click" data-mod="popu_379"><a class="btn btn-redborder-small "  id="span_add_follow" target="_self">关注</a></span>
                    </dd>
    </dl>
    <div class="inf_number_box clearfix">
        <dl title="27">
            <dt>原创</dt>
            <dd>27</dd>
        </dl>
        <dl title="2">
            <dt>粉丝</dt>
            <dd id='fan'>2</dd>
        </dl>
        <dl title="0">
            <dt>喜欢</dt>
            <dd>0</dd>
        </dl>
        <dl title="0">
          <dt>评论</dt>
          <dd>0</dd>
        </dl>
    </div>

</div>
<div class="interflow clearfix">
      <div class="badge gradeAndbadge">
        <div>
                                    <img src='http://c.csdnimg.cn/jifen/images/xunzhang/xunzhang/chizhiyiheng.png' alt='持之以恒'>
                                            </div>
    </div>
      <div class="grade gradeAndbadge">
      <span>等级：</span>
      <div>
        <a href="http://blog.csdn.net/home/help.html#level" title="2级,点击查看等级说明" target="_blank">
          <img class="grade-img" src="http://c.csdnimg.cn/jifen/images/xunzhang/jianzhang/blog2.png" alt="2级,点击查看等级说明">
        </a>
      </div>
    </div>
    <div class="gradeAndbadge" title="4630">
        <span>访问量：</span>
        <span class="num odd-overhidden">4.63K</span>
    </div>

    <div class="gradeAndbadge" title="352">
      <span>积分：</span>
      <span  class="num odd-overhidden">352</span>
    </div>
    <div class="gradeAndbadge" title="218732">
        <span>排名：</span>
        <span class="num odd-overhidden">218.73K</span>
    </div>

</div>          <div class="extension_other csdn-tracking-statistics tracking-click" data-mod="popu_389">
          <!--u3032528-->
        <div class="flashrecommend">
            <script type="text/javascript" src="//cee1.iteye.com/bwocoltly.js"></script>
        </div>
      </div>
      <div class="writings">
    <div class="public_signal clearfix">
      <h3>他的最新文章</h3>
      <a href="http://blog.csdn.net/chencaw" target="_blank" class="more"><span>更多文章</span></a>
    </div>
      <ul class="inf_list clearfix csdn-tracking-statistics tracking-click" data-mod="popu_382">
                    <li class="clearfix">
              <a href="http://blog.csdn.net/chencaw/article/details/79185333" target="_blank">linux查看隐藏的文件，如.env</a>
          </li>
                    <li class="clearfix">
              <a href="http://blog.csdn.net/chencaw/article/details/78996443" target="_blank">hdphp3框架链接传参数</a>
          </li>
                    <li class="clearfix">
              <a href="http://blog.csdn.net/chencaw/article/details/78996403" target="_blank">在hdphp3中添加指向控制器某方法的调用</a>
          </li>
                    <li class="clearfix">
              <a href="http://blog.csdn.net/chencaw/article/details/78996266" target="_blank">HDPHP创建类</a>
          </li>
                    <li class="clearfix">
              <a href="http://blog.csdn.net/chencaw/article/details/78994672" target="_blank">安装hdphp3.0管理框架</a>
          </li>
                </ul>
  </div>
            <div class="user-hotArticle sort userSort">
            <h3>文章分类</h3>
            <ul class="hotArticle-list userSort-list">
                                    <li class="clearfix">
                        <a href="http://blog.csdn.net/chencaw/article/category/5781005" class="odd-overhidden floatL">杂事</a>
                        <div class="read list-left floatR"><span>1篇</span></div>
                    </li>
                                    <li class="clearfix">
                        <a href="http://blog.csdn.net/chencaw/article/category/7204884" class="odd-overhidden floatL">linux</a>
                        <div class="read list-left floatR"><span>14篇</span></div>
                    </li>
                                    <li class="clearfix">
                        <a href="http://blog.csdn.net/chencaw/article/category/7204964" class="odd-overhidden floatL">java</a>
                        <div class="read list-left floatR"><span>9篇</span></div>
                    </li>
                                    <li class="clearfix">
                        <a href="http://blog.csdn.net/chencaw/article/category/7226003" class="odd-overhidden floatL">深度学习</a>
                        <div class="read list-left floatR"><span>12篇</span></div>
                    </li>
                                    <li class="clearfix">
                        <a href="http://blog.csdn.net/chencaw/article/category/7254323" class="odd-overhidden floatL">python</a>
                        <div class="read list-left floatR"><span>17篇</span></div>
                    </li>
                                    <li class="clearfix">
                        <a href="http://blog.csdn.net/chencaw/article/category/7275288" class="odd-overhidden floatL">php</a>
                        <div class="read list-left floatR"><span>3篇</span></div>
                    </li>
                                    <li class="clearfix">
                        <a href="http://blog.csdn.net/chencaw/article/category/7351645" class="odd-overhidden floatL">thinkphp</a>
                        <div class="read list-left floatR"><span>3篇</span></div>
                    </li>
                                    <li class="clearfix">
                        <a href="http://blog.csdn.net/chencaw/article/category/7359059" class="odd-overhidden floatL">mysql</a>
                        <div class="read list-left floatR"><span>2篇</span></div>
                    </li>
                                    <li class="clearfix">
                        <a href="http://blog.csdn.net/chencaw/article/category/7385159" class="odd-overhidden floatL">微信</a>
                        <div class="read list-left floatR"><span>2篇</span></div>
                    </li>
                                    <li class="clearfix">
                        <a href="http://blog.csdn.net/chencaw/article/category/7387223" class="odd-overhidden floatL">HDPHP3框架</a>
                        <div class="read list-left floatR"><span>4篇</span></div>
                    </li>
                            </ul>
            <div class="unfold-btn">
              <span>展开</span><i class="icon iconfont icon-xiajiantou"></i>
            </div>
        </div>
    <!--    [StartShowSelfColumn]-->
    <!--    [EndShowSelfColumn]-->
            <div class="user-hotArticle sort timeSort">
          <h3>文章存档</h3>
          <ul class="hotArticle-list timeSort-list">
                            <li class="clearfix">
                  <a href="http://blog.csdn.net/chencaw/article/month/2018/01" class="odd-overhidden floatL">2018年1月</a>
                  <div class="read list-left floatR"><span>6篇</span></div>
                </li>
                            <li class="clearfix">
                  <a href="http://blog.csdn.net/chencaw/article/month/2017/12" class="odd-overhidden floatL">2017年12月</a>
                  <div class="read list-left floatR"><span>11篇</span></div>
                </li>
                            <li class="clearfix">
                  <a href="http://blog.csdn.net/chencaw/article/month/2017/11" class="odd-overhidden floatL">2017年11月</a>
                  <div class="read list-left floatR"><span>13篇</span></div>
                </li>
                            <li class="clearfix">
                  <a href="http://blog.csdn.net/chencaw/article/month/2017/10" class="odd-overhidden floatL">2017年10月</a>
                  <div class="read list-left floatR"><span>17篇</span></div>
                </li>
                            <li class="clearfix">
                  <a href="http://blog.csdn.net/chencaw/article/month/2017/09" class="odd-overhidden floatL">2017年9月</a>
                  <div class="read list-left floatR"><span>6篇</span></div>
                </li>
                            <li class="clearfix">
                  <a href="http://blog.csdn.net/chencaw/article/month/2015/08" class="odd-overhidden floatL">2015年8月</a>
                  <div class="read list-left floatR"><span>1篇</span></div>
                </li>
                      </ul>
          <div class="unfold-btn">
            <span>展开</span><i class="icon iconfont icon-xiajiantou"></i>
          </div>
        </div>
        <div class="user-hotArticle">
        <h3>他的热门文章</h3>
        <ul class="hotArticle-list csdn-tracking-statistics tracking-click" data-mod="popu_521">
<!--            [StartHotArticles]-->
                                                <li>
                        <a href="http://blog.csdn.net/chencaw/article/details/78308278">Python3.5.+Opencv3.3.0安装</a>
                        <div class="read list-left"><i class="icon iconfont icon-read"></i><span>470</span></div>
                    </li>
                                    <li>
                        <a href="http://blog.csdn.net/chencaw/article/details/78308685">TensorFlow练习5: 训练一个简单的游戏AI（Deep Q Network）</a>
                        <div class="read list-left"><i class="icon iconfont icon-read"></i><span>273</span></div>
                    </li>
                                    <li>
                        <a href="http://blog.csdn.net/chencaw/article/details/78410187">python3抓取百度图片</a>
                        <div class="read list-left"><i class="icon iconfont icon-read"></i><span>265</span></div>
                    </li>
                                    <li>
                        <a href="http://blog.csdn.net/chencaw/article/details/78271806">Python35 安装PIL解决方法</a>
                        <div class="read list-left"><i class="icon iconfont icon-read"></i><span>243</span></div>
                    </li>
                                    <li>
                        <a href="http://blog.csdn.net/chencaw/article/details/78674697">python安装pyserial</a>
                        <div class="read list-left"><i class="icon iconfont icon-read"></i><span>218</span></div>
                    </li>
                            <!--            [EndHotArticles]-->
        </ul>
    </div>

<!--    [startcustom]-->
    <!--    [endcustom]-->
  <div class="fixRight_box" style="height:256px">
    <div class="fixRight">
                    <!--u3163270-->
            <script type="text/javascript" src="//cee1.iteye.com/avneunkwb.js"></script>
                <div class="right_box copyright csdn-tracking-statistics" data-mod="popu_475" data-dsm="post">
        <h3 class="feed_new_tit"><span class="line"></span><span class="txt">联系我们</span></h3>
        <div class="contact-box">
            <div class="img-box">
                <img src="https://www.csdn.net/images/csdn_cs_qr.png" alt="客服">
            </div>
            <div class="contact-info">
                <h4>请扫描二维码联系客服</h4>
                <p>
                    <i class="icon iconfont icon-mail"></i>
                    <a href="mailto:webmaster@csdn.net" target="_blank">
                        <span class="txt">webmaster@csdn.net</span>
                    </a>
                </p>
                <p>
                    <i class="icon iconfont icon-call"></i>
                    <span class="txt">400-660-0108</span>
                </p>
                <p>
                    <i class="icon iconfont icon-QQ"></i>
                    <a href="http://wpa.qq.com/msgrd?v=3&amp;uin=2431299880&amp;site=qq&amp;menu=yes" target="_blank">
                        <span class="txt">网站客服</span>
                    </a>
                </p>
            </div>
        </div>
        <div class="bg-gray">
            <div class="feed_copyright">
                <p><a class="right-dotte" href="//www.csdn.net/company/about.html" target="_blank">关于</a><a href="//www.csdn.net/company/recruit.html" target="_blank" class="right-dotte">招聘</a><a href="//www.csdn.net/company/marketing.html" target="_blank" class="right-dotte">广告服务</a><img src="https://www.csdn.net/images/ali01.png" alt="ali" title="ali"></p>
                <p class="fz12">©2018 CSDN <a href="http://www.miibeian.gov.cn/" target="_blank" class="ml14">京ICP证09002463号</a></p>
            </div>
            <div class="allow-info-box">
                <p><a href="http://www.hd315.gov.cn/beian/view.asp?bianhao=010202001032100010" target="_blank"><span>经营性网站备案信息</span></a></p>
                <p><a href="http://www.cyberpolice.cn/" target="_blank"><span>网络110报警服务</span></a></p>
                <p><a href="http://www.12377.cn/" target="_blank"><span>中国互联网举报中心</span></a></p>
                <p><a href="http://www.bjjubao.org/" target="_blank"><span>北京互联网违法和不良信息举报中心</span></a></p>
            </div>
        </div>
    </div>
    </div>
  </div>
</aside></div>

<div class="left_fixed">
    <div class="left_show_button">
        <span>
          <i class="icon iconfont icon-youjiantou"></i>
        </span>
    </div>
    <ul class="left_menu" id="share_box">
        <li>
            <button class="left-fixed-btn btn-like csdn-tracking-statistics tracking-click" data-mod="popu_373" target="_self" title="点赞">
                <a href="javascript:void(0);" class="iconbox border_red" ><i class="icon iconfont icon-dianzan"></i></a>
                <a class="txt" href="javascript:void(0);">0</a>
            </button>
        </li>
        <li id="blog_artical_directory">
            <button class="left-fixed-btn left_menu_btn csdn-tracking-statistics tracking-click" data-mod="popu_372" target="_self" title="目录">
                <a href="javascript:void(0);" class="iconbox border_black" ><i class="icon iconfont icon-mulu"></i></a>
            </button>
        </li>
        <li class="menu_con">
            <div class="list_father">
                <div class="arr_box">
                    <button class="btn-noborder arr-btn scroll-down  left_scroll_down"><i class="icon iconfont icon-xiajiantou"></i></button>
                    <button class="btn-noborder arr-btn scroll-up left_scroll_top"><i class="icon iconfont icon-shangjiantou"></i></button>
                </div>
                <div class="arr"></div>
                <div id="csdnBlogDir"></div>
            </div>
        </li>
        <!--        <li>-->
        <!--            <button class="left-fixed-btn btn-like tracking-ad" data-mod="popu_373" target="_self">-->
        <!--                <span class="iconbox border_red"><i class="icon iconfont icon-xihuan-"></i></span>-->
        <!--                <span class="txt">喜欢</span>-->
        <!--                <span class="untxt">取消喜欢</span>-->
        <!--            </button>-->
        <!--        </li>-->
        <li>
            <button class="left-fixed-btn csdn-tracking-statistics tracking-click" data-mod="popu_374"  id="com-quick-collect" target="_self" title="收藏">
                <a href="javascript:void(0);" class="iconbox border_purple" ><i class="icon iconfont icon-shoucang"></i></a>
            </button>
        </li>
        <li>
            <button class="left-fixed-btn btn-pinglun csdn-tracking-statistics tracking-click" data-mod="popu_544" title="评论">
                <a href="javascript:void(0);" class="iconbox border_purple" ><i class="icon iconfont icon-pinglun"></i></a>
            </button>
        </li>
        <li class="bdsharebuttonbox">
          <button class="outside left-fixed-btn csdn-tracking-statistics tracking-click" data-mod="popu_172" title="分享到新浪微博">
                <span class="iconbox border_red2"><i class="icon iconfont icon-xinlang"></i></span>
                <a href="#" class="bds_tsina" data-cmd="tsina" > </a>
          </button>
        </li>
        <li class="bdsharebuttonbox">
          <button class="outside left-fixed-btn csdn-tracking-statistics tracking-click" data-mod="popu_172" title="分享到微信">
              <span class="iconbox border_green"><i class="icon iconfont icon-weixin"></i></span>
              <a href="#" class="bds_weixin" data-cmd="weixin" > </a>
          </button>
        </li>
        <li class="bdsharebuttonbox">
          <button class="outside left-fixed-btn csdn-tracking-statistics tracking-click" data-mod="popu_172" title="分享到QQ空间">
              <span class="iconbox border_blue"><i class="icon iconfont icon-QQ"></i></span>
              <a href="#" class="bds_qzone" data-cmd="qzone" > </a>
          </button>
        </li>
        <li id="share_box">
            
            <div class="bdsharebuttonbox csdn-tracking-statistics tracking-click" data-mod="popu_172">
                
                
                
            </div>
        </li>
    </ul>
</div>
<div class="right_fixed">
    <div class="r_ico">
        <i class="icon iconfont icon-jubao"></i>
        <span class="txt" id="reportBtn">内容举报</span>
    </div>
    <div class="returnTop">
        <i class="icon iconfont icon-fanhuidingbu"></i>
        <span>返回顶部</span>
    </div>
</div>
<div id="pop_win"></div>
<div id="popup_mask"></div>
<div class="pop_CA_cover" ></div>
<div class="pop pop_CA" >
    <div class="CA_header">
        收藏助手
        <span class="cancel_icon"  id="fapancle" ></span>
    </div>
    <iframe src="" id="collectIframe" frameborder="0" width="100%" height="360"  scrolling="no" ></iframe>
</div>
<!--举报-->
<div id="report_dialog" style="top: 250px; left: 343.5px;"><div id="panel_report">
    <div class="panel_head">不良信息举报</div>
    <form method="post" id="frmReport" class="panel_body">
        <table border="0" cellpadding="0" cellspacing="4" class="pop_table">
            <tbody><tr><td colspan="2">您举报文章：<a href="http://blog.csdn.net/chencaw/article/details/78410187" target="_blank">python3抓取百度图片</a></td></tr>
            <tr>
                <th style="width:60px;">举报原因：</th>
                <td id="panel_reporttype">
                    <label><input type="radio" class="report_type" id="report_sex" name="report_type" value="1">色情</label>
                    <label><input type="radio" class="report_type" id="report_Politics" name="report_type" value="2">政治</label>
                    <label><input type="radio" class="report_type" id="report_copy" name="report_type" value="3">抄袭</label>
                    <label><input type="radio" class="report_type" id="report_ad" name="report_type" value="4">广告</label>
                    <label><input type="radio" class="report_type" id="report_want" name="report_type" value="5">招聘</label>
                    <label><input type="radio" class="report_type" id="report_call" name="report_type" value="6">骂人</label>
                    <br>
                    <label><input type="radio" class="report_type" id="report_other" name="report_type" value="7">其他</label>
                    <input type="text" name="report_other_content" id="report_other_content" maxlength="30" style="display: none;">
                </td>
            </tr>
            <tr id="panel_originalurl" style="display: none;">
                <th>原文地址：</th>
                <td>
                    <input id="originalurl" value="http://" name="originalurl" type="text" style="width: 90%;">
                </td>
            </tr>
            <tr>
                <th id="sp_reason">原因补充：</th>
                <td>
                    <textarea id="report_description" style="width: 300px;" rows="3" name="report_description"></textarea>
                    <p id="sp_n" style="color:#999;margin:0px;padding:0px;">(最多只允许输入30个字)</p>
                </td>
            </tr>
            <tr>
                <td></td>
                <td>
                    <input id="btnSubmitReport" name="submit" type="image" align="middle" class="btn_1" src="http://csdnimg.cn/release/phoenix/images/btn_submit.jpg">
                    <span style="padding-left:20px;"></span>
                    <img id="btnCloseReportDialog" src="http://csdnimg.cn/release/phoenix/images/btn_cancel.jpg" align="middle">
                    <div id="error" style="color: Red">
                    </div>
                </td>
            </tr>
            </tbody></table>
    </form>
</div>
    <script language="javascript" type="text/javascript">
        var isComment=0;
        //显示隐藏地址
        $(function () {
          console.log("version:phoenix");
            if(isComment){
                $("#report_description").attr("disabled",true);
                $("#sp_n").hide();
                $("#sp_reason").html("评论内容：");
            }
            $(".report_type").click(function () {
                $("#panel_originalurl,#report_other_content").hide();
                switch ($(this).val()) {
                    case '3':
                        $("#panel_originalurl").show();
                        $("#originalurl").focus();
                        break;
                    case '7':
                        if(isComment){
                            $("#report_other_content").show().focus();
                        }
                        break;
                }

            });

            $("#frmReport").submit(function () {
                if (!currentUserName) {

                    if (confirm("您的操作必须登录，是否登录？")) {
                        location.href = "http://passport.csdn.net/account/login?from=" + encodeURIComponent(location.href);
                        return false;
                    }
                    return false;
                }

                var reportType = $("input[name=report_type]:checked").val();
                if(!reportType){
                    alert("请选择举报原因！");
                    return false;
                }
                var otherInfo = "";
                switch (reportType) {
                    case '3':
                        otherInfo = $("#originalurl").val();
                        if (otherInfo == ""||otherInfo=="http://") {
                            alert("举报抄袭必须提供原创文章地址！");
                            $("#originalurl").focus();
                            return false;
                        } else if(!checkeURL(otherInfo)) {
                            alert("请输入正确的原创文章地址！");
                            $("#originalurl").focus();
                            return false;
                        }
                        break;
                    case '7':
                        otherInfo = $("#report_other_content").val();
                        if (isComment && !otherInfo) {
                            alert("请填写举报的具体原因！");
                            $("#report_other_content").focus();
                            return false;
                        }
                        if(!isComment){
                            if(!$("#report_description").val()){
                                alert("请填写举报的具体原因！");
                                $("#report_description").focus();
                                return false;
                            }
                        }
                        break;
                }
                if(!isComment){
                    if($("#report_description").val().length>30){
                        alert("举报原因最多只允许输入30个字！");
                        return false;
                    }
                }
	            nowTime = {
		            year: new Date().getFullYear(),
		            month: parseInt(new Date().getMonth())+1,
		            day: new Date().getDate(),
		            hours: parseInt(new Date().getHours())+1,
		            minutes: parseInt(new Date().getMinutes())+1,
		            seconds: parseInt(new Date().getSeconds())+1
	            };
	            var data = {
		            articleId: fileName,
		            commentId: 0,
		            reportType: reportType,
		            originalurl: $("#originalurl").val(),
		            report_other_content: $("#report_other_content").val(),
		            report_description: $("#report_description").val(),
		            currentUserName: currentUserName,
		            updatetime: nowTime.year+'/'+nowTime.month+'/'+nowTime.day+' '+ nowTime.hours+':'+nowTime.minutes+':'+seconds,
		            blogUser: username
	            };
	            if(!isComment){//如果是举报文章
		            data.report_other_content = data.report_description;
		            // data.report_description = "1. 神经网络这是一个常见的神经网络的图：这是一个常见的三层神经网络的基本构成，Layer L1是输入层，Layer L2是隐含层";
	            }

	            $.post(blog_address + "/common/report?id="+fileName+"&t=2", data, function (data) {
		            if (data.result == 1){
			            SetError("感谢您的举报，我们会尽快审核！");
		            }else{
			            if (data.content) alert(data.content);
		            }

	            });
                return false;
            });

            $("#btnCloseReportDialog").click(function () {
                CloseDiv();
            });

        });

        //提示后关闭方法
        function SetError(error) {
            $("#btnCloseReportDialog").trigger("click");
            alert(error);
            CloseDiv();
        }

        //关闭方法
        function CloseDiv() {

            $.removeMask();
            $("#report_dialog").hide();
            return false;
        }

        //验证url
        function checkeURL(url){
            return /^http(s)?:\/\/([\w-]+\.)+[\w-]+/i.test(url);
        }
    </script>
</div>
<!--  fixme 后期清理掉  -->
<div id="a52b5334d" style="width: 1px; height: 1px; display: none;">
    <script id="adJs52b5334"></script>
    <script>document.getElementById("adJs52b5334").src = "http://ads.csdn.net/js/opt/52b5334.js?t=" + Math.random();</script>
</div>
<!-- <script type="text/javascript" src="http://passport.csdn.net/content/loginbox/login.js"></script> -->
<script>window._bd_share_config = { "common": { "bdSnsKey": {}, "bdText": "", "bdMini": "1", "bdMiniList": false, "bdPic": "", "bdStyle": "0", "bdSize": "16" }, "share": {} }; with (document) 0[(getElementsByTagName('head')[0] || body).appendChild(createElement('script')).src = 'http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion=' + ~(-new Date() / 36e5)];</script>
<script type="text/javascript" >
    if($(".article_collect li").length==1){$(".article_collect").hide();}
    if($(".article_tags li").length==1){$(".article_tags").hide();}
    $(".edit a").attr("href","http://mp.blog.csdn.net/postedit/"+fileName);
    $.each($(".edu_li a"),function(){$(this).attr("href",$(this).attr("href").replace("blog7","blog9"))});
    new CNick('#uid').showNickname();

    if($("#fan").html()=="")
    {
	    $("#fan").html(0);
    }
</script>
<script src="http://c.csdnimg.cn/public/common/append_mark/appendMark.min.js?v=5.00.43" type="text/javascript"></script>
<script type="text/javascript">
    appendMark($('.recommend_list').children('a').find('dt'),$('.extension_other'),$('.yd_a_d_feed_cla'))
</script>
<div class=""id="loginWrap"></div>
<div class="" id="dlMask"></div>
</body>
